<?php $this->set('title', 'Audience Portal'); ?>
<?php $this->set('external_css', array('audience.css')); ?>
<?php $session->flash();?>
<table align="center" cellpadding="0" cellspacing="0" border="0" class="audienceContainer">
	<tr>
		<td class="audienceLeft" >
			<fieldset>
				<legend>Search</legend>
				<div style="padding:10px;">
					<!-- Audience Surveys Search -->
					<?php echo $this->element('audience_surveys_search',
						array("controller" => "Audiences", "action" => "search_surveys"));?>
				</div>
			</fieldset>
		</td>
		<td style="width:5%">
			&nbsp;
		</td>
		<td class="audienceRight">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td>
						<fieldset>
							<legend>My Surveys</legend>
							<div style="padding:5px;">
								<!-- My Surveys -->
								<?php echo $this->element('audience_surveys_list',
											array("surveys_list" => $my_surveys));?>
								<?php echo($html->link('View All', array('controller' => 'audiences', 'action' => 'show_all_my_surveys'))); ?>
							</div>
						</fieldset>
					</td>
				</tr>
				<tr><td style="height:10px;">&nbsp;</td></tr>
				<tr>
					<td>
						<fieldset>
							<legend>Available Surveys</legend>
							<div style="padding:5px;">
								<!-- Available Surveys -->
								<?php echo $this->element('audience_surveys_list',
											array("surveys_list" => $available_surveys));?>
								<?php echo($html->link('View All', array('controller' => 'audiences', 'action' => 'available_surveys'))); ?>
							</div>
						</fieldset>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td>&nbsp;</td></tr>
</table>
<br /><br />